'\" e
'\"! eqn | mmdoc
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 6 March 1997
.ds Re Release 1.2.0
.ds Dp May 02 11:53
.ds Dm 37 nurbsprop
.ds Xs 47701 10 nurbsproperty.gl
.TH GLUNURBSPROPERTY 3G
.SH NAME
.B "gluNurbsProperty
\- set a NURBS property

.SH C SPECIFICATION
void \f3gluNurbsProperty\fP(
GLUnurbs* \fInurb\fP,
.nf
.ta \w'\f3void \fPgluNurbsProperty( 'u
	GLenum \fIproperty\fP,
	GLfloat \fIvalue\fP )
.fi

.EQ
delim $$
.EN
.SH PARAMETERS
.TP \w'\fIproperty\fP\ \ 'u 
\f2nurb\fP
Specifies the NURBS object (created with \%\f3gluNewNurbsRenderer\fP).
.TP
\f2property\fP
Specifies the property to be set. Valid values are
\%\f3GLU_SAMPLING_TOLERANCE\fP,
\%\f3GLU_DISPLAY_MODE\fP, 
\%\f3GLU_CULLING\fP,
\%\f3GLU_AUTO_LOAD_MATRIX\fP,
\%\f3GLU_PARAMETRIC_TOLERANCE\fP,
\%\f3GLU_SAMPLING_METHOD\fP,
\%\f3GLU_U_STEP\fP,
\%\f3GLU_V_STEP\fP, or
\%\f3GLU_NURBS_MODE\fP.
.TP
\f2value\fP
Specifies the value of the indicated property.
It may be a numeric value, or one of 
\%\f3GLU_OUTLINE_POLYGON\fP,
\%\f3GLU_FILL\fP,
\%\f3GLU_OUTLINE_PATCH\fP,
\%\f3GL_TRUE\fP,
\%\f3GL_FALSE\fP,
\%\f3GLU_PATH_LENGTH\fP,
\%\f3GLU_PARAMETRIC_ERROR\fP,
\%\f3GLU_DOMAIN_DISTANCE\fP,
\%\f3GLU_NURBS_RENDERER\fP, or
\%\f3GLU_NURBS_TESSELLATOR\fP.
.SH DESCRIPTION
\%\f3gluNurbsProperty\fP is used to control properties stored in a NURBS object. These
properties affect the way that a NURBS curve is rendered. The accepted 
values for \f2property\fP are as follows:
.TP 15
\%\f3GLU_NURBS_MODE\fP
\f2value\fP should be set to be either \%\f3GLU_NURBS_RENDERER\fP or
\%\f3GLU_NURBS_TESSELLATOR\fP. When set to \%\f3GLU_NURBS_RENDERER\fP, NURBS objects
are tessellated into OpenGL primitives and sent to the pipeline for
rendering. When set to \%\f3GLU_NURBS_TESSELLATOR\fP, NURBS objects are
tessellated into OpenGL primitives but the vertices, normals, colors, and/or textures are 
retrieved back through a callback interface (see \%\f3gluNurbsCallback\fP). This allows the user to cache the
tessellated results for further processing.
The initial value is \%\f3GLU_NURBS_RENDERER\fP.
.TP
\%\f3GLU_SAMPLING_METHOD\fP 
Specifies how a NURBS surface should be
tessellated.
\f2value\fP may be one of \%\f3GLU_PATH_LENGTH\fP,
\%\f3GLU_PARAMETRIC_ERROR\fP,  \%\f3GLU_DOMAIN_DISTANCE\fP,
\%\f3GLU_OBJECT_PATH_LENGTH\fP, or
\%\f3GLU_OBJECT_PARAMETRIC_ERROR\fP.
When set to \%\f3GLU_PATH_LENGTH\fP, the surface is rendered so that
the maximum length, in 
pixels, of the edges of the tessellation polygons is no greater than
what is specified by \%\f3GLU_SAMPLING_TOLERANCE\fP. 
.IP
\%\f3GLU_PARAMETRIC_ERROR\fP specifies that the surface is rendered in such a 
way that the value specified by \%\f3GLU_PARAMETRIC_TOLERANCE\fP describes the 
maximum distance, in pixels, between the tessellation polygons and the
surfaces they approximate. 
.IP
\%\f3GLU_DOMAIN_DISTANCE\fP allows users to specify, in parametric coordinates,
how many sample points per unit length are taken in \f2u\fP, \f2v\fP
direction.
.IP
\%\f3GLU_OBJECT_PATH_LENGTH\fP  is similar to \%\f3GLU_PATH_LENGTH\fP
except that it is view independent, that is, the surface is rendered so that the maximum length, in object space, of edges of the tessellation polygons is no greater than what is specified by \%\f3GLU_SAMPLING_TOLERANCE\fP.
.IP   
\%\f3GLU_OBJECT_PARAMETRIC_ERROR\fP is similar to  \%\f3GLU_PARAMETRIC_ERROR\fP except that it is view independent, that is, the surface is rendered in such a way that the value specified by \%\f3GLU_PARAMETRIC_TOLERANCE\fP describes the maximum distance, in object space, between the tessellation polygons and the surfaces they approximate.
.IP
The initial value of \%\f3GLU_SAMPLING_METHOD\fP is \%\f3GLU_PATH_LENGTH\fP.
.TP
\%\f3GLU_SAMPLING_TOLERANCE\fP
Specifies the maximum length, in pixels or in object space length unit,
to use when the sampling method is set to \%\f3GLU_PATH_LENGTH\fP or
\%\f3GLU_OBJECT_PATH_LENGTH\fP.
The NURBS code is conservative when rendering a curve
or surface, so the actual length can be somewhat shorter. The initial
value is 50.0 pixels. 
.TP
\%\f3GLU_PARAMETRIC_TOLERANCE\fP
Specifies the maximum distance, in pixels or in object space length unit,
to use when the sampling method is \%\f3GLU_PARAMETRIC_ERROR\fP or
\%\f3GLU_OBJECT_PARAMETRIC_ERROR\fP.
The initial value is 0.5.
.TP
\%\f3GLU_U_STEP\fP
Specifies the number of sample points per unit length taken
along the \f2u\fP axis in parametric coordinates. It is needed when
\%\f3GLU_SAMPLING_METHOD\fP is set to \%\f3GLU_DOMAIN_DISTANCE\fP.
The initial value is 100.
.TP
\%\f3GLU_V_STEP\fP
Specifies the number of sample points per unit length taken
along the \f2v\fP axis in parametric coordinate. It is needed when
\%\f3GLU_SAMPLING_METHOD\fP is set to \%\f3GLU_DOMAIN_DISTANCE\fP. The initial 
value is 100.
.TP
\%\f3GLU_DISPLAY_MODE\fP
\f2value\fP can be set to
\%\f3GLU_OUTLINE_POLYGON\fP, \%\f3GLU_FILL\fP, or 
\%\f3GLU_OUTLINE_PATCH\fP.
When \%\f3GLU_NURBS_MODE\fP is set to be \%\f3GLU_NURBS_RENDERER\fP,
\f2value\fP defines how a NURBS surface should be rendered.
When \f2value\fP is set to \%\f3GLU_FILL\fP, the surface is rendered as a
set of polygons. When \f2value\fP is set to
\%\f3GLU_OUTLINE_POLYGON\fP, the NURBS library draws only the outlines
of the polygons created by tessellation. When \f2value\fP is set to
\%\f3GLU_OUTLINE_PATCH\fP just the outlines of patches and trim 
curves defined by the user are drawn.
.IP
When \%\f3GLU_NURBS_MODE\fP is set to be \%\f3GLU_NURBS_TESSELLATOR\fP,
\f2value\fP defines how a NURBS surface should be tessellated.
When \%\f3GLU_DISPLAY_MODE\fP is set to \%\f3GLU_FILL\fP or
\%\f3GLU_OUTLINE_POLYGON\fP, 
the NURBS surface is tessellated into OpenGL triangle primitives which can be
retrieved back  through callback functions. If \%\f3GLU_DISPLAY_MODE\fP is set to 
\%\f3GLU_OUTLINE_PATCH\fP, only the outlines of the patches and trim curves are generated as a sequence of line strips which can be retrieved back through callback functions.
.IP
The initial value is \%\f3GLU_FILL\fP.
.TP
\%\f3GLU_CULLING\fP
\f2value\fP is a boolean value that, when set to \%\f3GL_TRUE\fP, indicates that 
a NURBS curve should be discarded prior to tessellation if its control points
lie outside the current viewport. The initial value is \%\f3GL_FALSE\fP.
.TP
\%\f3GLU_AUTO_LOAD_MATRIX\fP
\f2value\fP is a boolean value. When set to \%\f3GL_TRUE\fP, the NURBS code 
downloads the projection matrix, the modelview matrix, and the 
viewport from the GL server to compute sampling and 
culling
matrices for each NURBS curve that is rendered. Sampling and culling matrices
are required to determine the tessellation of a NURBS surface into line segments
or polygons and to cull a NURBS surface if it lies outside the viewport.
.IP
If this mode is set to \%\f3GL_FALSE\fP, then the program needs
to provide a projection matrix, a modelview matrix, and a viewport
for the NURBS renderer to use to construct sampling and culling matrices.
This can be done with the \%\f3gluLoadSamplingMatrices\fP function.
This mode is initially set to \%\f3GL_TRUE\fP.
Changing it from \%\f3GL_TRUE\fP to \%\f3GL_FALSE\fP does not affect
the sampling and culling matrices until 
\%\f3gluLoadSamplingMatrices\fP
is called.
.SH NOTES
If \%\f3GLU_AUTO_LOAD_MATRIX\fP is true, sampling and culling may be
executed incorrectly if NURBS routines are compiled into a display list.
.P
A \f2property\fP of 
\%\f3GLU_PARAMETRIC_TOLERANCE\fP,
\%\f3GLU_SAMPLING_METHOD\fP,
\%\f3GLU_U_STEP\fP, or
\%\f3GLU_V_STEP\fP,
or a \f2value\fP of 
\%\f3GLU_PATH_LENGTH\fP,
\%\f3GLU_PARAMETRIC_ERROR\fP, 
\%\f3GLU_DOMAIN_DISTANCE\fP 
are only available if the GLU version is 1.1 or greater. They are not
valid parameters in GLU 1.0. 
.P
\%\f3gluGetString\fP can
be used to determine the GLU version. 
.P
\%\f3GLU_NURBS_MODE\fP is only availble if the GLU version is 1.3 or
greater.
.P
The \%\f3GLU_OBJECT_PATH_LENGTH\fP and \%\f3GLU_OBJECT_PARAMETRIC_ERROR\fP 
values for the \%\f3GLU_SAMPLING_METHOD\fP property are only available if 
the GLU version is 1.3 or greater.
.SH SEE ALSO
\%\f3gluGetNurbsProperty(3G)\fP,
\%\f3gluLoadSamplingMatrices(3G)\fP,
\%\f3gluNewNurbsRenderer(3G)\fP,
\%\f3gluGetString(3G)\fP,
\%\f3gluNurbsCallback(3G)\fP
